// pages/order1/components/order-button/index.js
import Toast from 'tdesign-miniprogram/toast';
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    addGlobalClass: true
  },

  /**
   * 组件的初始数据
   */
  data: {
    visible: false,
    value: ''
  },

  /**
   * 组件的方法列表
   */
  methods: {
    showText() {
      Toast({
        context: this,
        selector: '#t-toast',
        message: '轻提示文字内容',
      });
    },
    closeCause() {
      this.setData({
        visible: false
      })
    },
    onVisibleChange(e) {
      this.setData({
        visible: e.detail.visible
      })
    },
    showPopup() {
      this.setData({
        visible: true
      })
    },
    changeRadio(e) {
      const {
        value
      } = e.detail
      this.setData({
        value
      })
    }
  }
})